<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<title>登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/styleslogin.css">
<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script src="${pageContext.request.contextPath}/js/functions.js"></script>
</head>
<body>
	<script type="text/javascript">
		function devLogin(){
			var name=$("#user").val();
			var pass=$("#pass").val();
		
			$.ajax({
				url:getContextPath()+"/admin/dologin",
				type:"POST",
				data:{adminName:name,adminPass:pass},
				success:function(result){
					if(result.login=="yes"){
						window.location.href=getContextPath()+"/admin/index";
					}else{
						$("#result").html(result.login);
					}
				}
				
			});
			
			
		}
	
	
	
	
	</script>

	<div class="jq22-container" style="padding-top:10px">
	<div class="login-wrap">
		<div class="login-html">
			<input id="tab-1" type="radio" name="tab" class="sign-in" checked><label for="tab-1" class="tab">管理员登录</label>
			<input id="tab-2" type="radio" name="tab" class="sign-up"><label for="tab-2" class="tab"></label>
			<div class="login-form">
				<div class="foot-lnk">
							<label id="result" for="tab-1"></label>
						</div>
				<div class="sign-in-htm" style="text-align:center;">
					<div class="group">
						<label for="user" class="label">用户名</label>
						<input id="user" type="text" class="input">
					</div>
					<div class="group">
						<label for="pass" class="label">密码</label>
						<input id="pass" type="password" class="input" data-type="password">
					</div>
					<div class="group">
						<input type="button" class="button" value="登录" onclick="devLogin()">
					</div>
					<div class="hr"></div>

				</div>
				<div class="sign-up-htm">
				</div>
			</div>
		</div>
	</div>
</div>
	
	
</body>
</html>